package cn.wolfcode.mapper;

import cn.wolfcode.domain.Department;
import cn.wolfcode.domain.Permission;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    // 分页查询
    List<Permission> selectForList(QueryObject qo);

    // 批量插入权限
    void savePermissions(@Param("permissionList") Set<Permission> permissionList);

    List<Permission> selectPermissionById(Long id);

    List<String> selectPermissionsByEmpId(Long id);

    List<String> selectPermissions();

}